<?php
/*
# ------------------------------------------------------------------------
# JA Job Board Package
# ------------------------------------------------------------------------
# Copyright (C) 2004-2010 JoomlArt.com. All Rights Reserved.
# @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
# Author: JoomlArt.com
# Websites: http://www.joomlart.com - http://www.joomlancers.com.
# ------------------------------------------------------------------------
*/

  defined('_JEXEC') or die('Retricted Access');
?>



<form name="adminForm" action="index.php" method="post">
	<table width="100%">
	<tr>
	
		<td width="80%" valign="top">
			<table>
			
				<tr>
					<td align="left" width="100%">
						<?php echo JText::_( 'Filter name' ); ?>:
						<input type="text" name="search" id="search" value="<?php echo $this->lists['search'];?>" class="text_area" onchange="document.adminForm.submit();" />
						<button onclick="this.form.submit();"><?php echo JText::_( 'Go' ); ?></button>
						<button onclick="document.getElementById('search').value=''; document.getElementById('filter_state').value=''; this.form.submit();"><?php echo JText::_( 'Filter Reset' ); ?></button>
					</td>
					<td>
						<?php echo $this->lists['state']; ?>
					</td>
				</tr>
			</table>
	
    <div style="width:100%;">
		<table class="adminlist" width="100%">
        	<thead>
            	<tr>
            		<th width="5%" class="title"><?php echo JText::_( 'NUM' ); ?></th>
            		<th width="5%"><input type="checkbox" name="toggle" value="" onclick="checkAll(<?php echo count($this->items); ?>);" /></th>
            		<th width="50%">            			
            			<?php echo JHTML::_('grid.sort',   JText::_('Name'), 's.name',@$this->lists['order_Dir'], @$this->lists['order']); ?>
            		</th>
            		
            		<th width="10%">
            			<?php echo JHTML::_('grid.sort',   JText::_('Published'), 's.published',@$this->lists['order_Dir'], @$this->lists['order']); ?>
            		</th>            		
            	</tr>
			</thead>
			<tbody>
        	<?php
        	$items = $this->items;        	
        	$inum = 0;
        	$number_items = 0;
        	foreach ( $items as $i => $item ) {
        		$inum ++;
        		if ($inum>$this->lists['limitstart']){
        			$number_items++;
        			
        		$treename = $item->treename;        		
        		$item->published = $item->published;
        		$published 	= JHTML::_('grid.published', $item, $inum - 1 );				
        		$checked 	= JHTML::_('grid.checkedout',   $item, $inum - 1 );
        		JFilterOutput::objectHtmlSafe($item);
        		?>
        		<tr class="row<?php echo ($inum+1)%2; ?>">        			
            		<td align="center"><?php echo $inum;  ?></td>            		
            		<td align="center"><?php echo $checked; ?></td>
            		<td><a href="<?php echo JRoute::_( 'index.php?option='. $this->lists['option'].'&view=jacategories&task=edit&cid[]='.$item->id ); ?>"><?php echo $treename;?></a></td>
            	
            		<td align="center"><?php echo $published;?></td>            		
            	</tr>
        	<?php
        		}
        	if ($number_items==$this->count_items)
        		break;
			}
        	?>
        	<tbody>
        	<tfoot>
				<tr>
					<td colspan="6">
						<?php echo $this->pagination->getListFooter(); ?>
					</td>
				</tr>
			</tfoot>
		</table>
	</div>
	</td>
	</tr>
	</table>
	<input type="hidden" name="option" value="<?php echo $this->lists['option']; ?>" />
	<input type="hidden" name="view" value="jacategories" />
	<input type="hidden" name="task" value="" />
	<input type="hidden" name="boxchecked" value="0" />
	<input type="hidden" name="filter_order" value="<?php echo $this->lists['order']; ?>" />
	<input type="hidden" name="filter_order_Dir" value="<?php echo $this->lists['order_Dir']; ?>" />
	<?php echo JHTML::_( 'form.token' ); ?>	
 </form>
